<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery.min.js"></script>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: brown;
        }
    </style>
</head>
<body>
    <div>相信党和国家</div>
    <script>
        $(function(){
            // 1.css 的属性进行重新赋值
            $('div').css('color','skybiue');

            // 2.css 属性的读取
            var result = $('div').css('backgroundColor');
            console.log(result);

            // 3.默认的单位可以省略
            $('div').css('width',300);

            // 4.多个 css 样式的改变,可以通过对象
            $('div').css({
                width:400,
                height:250,
                backgroundColor:'purple'
            });
        });
    </script>
</body>
</html>